<style media="print">
    .PageNext
    {
        page-break-before: always;
    }
</style>
<style>
    .rowText{white-space:nowrap;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;height: 14px;line-height: 14px;}
    .sheetBox{width:345px; height:auto; overflow: hidden;margin-left: 4px;}
    .lineStyle{height: 0px;clear:both;border-top:1px solid black}
    .upArea{width:343px;height:auto; overflow: hidden; }
    .bellowArea{width:343px;height:auto; overflow: hidden; margin-top:-1px;}
    .printTitle{width:100%; font-size: 18px;font-weight: bold;height:28px; text-align:center; margin-bottom: 3px;}
    .printCode{float: right;height:28px;margin-bottom: 3px;padding-right:5px;}
    .infoTableLeft{width: 168px;}
    .infoTableRight{text-align: right;width: 168px;padding-right: 5px;}
    .print-check-style{height: 11px;width: 11px;border:1px solid black;float: right;margin-top: 2px}
    .print-order_baseinfo{width:100%;border: 1px solid black;border-bottom: 0px;}
    .print-orderitem-table{border-collapse:collapse;width:100%;}
    .print-orderitem-table tr{height: 17px;line-height: 16px;}
    .print-orderitem-table th{padding:0 3px;font-size:14px;}
    .print-orderitem-table td{padding:0 3px;font-size:12px;}
    .td-num{text-align: right;padding-right: 1px;}
    .print-remark-table{border-collapse:collapse;width:343px;}
    .print-remark-label{height: 47px;width: 20px;text-align: center;font-weight: bold;}
    .print-remark-content{height: 47px;width: 316px;word-break: break-all;word-wrap: break-word;overflow:hidden;text-overflow:ellipsis;}
    .print-text-area{word-break: break-all;word-wrap: break-word;overflow:hidden;text-overflow:ellipsis;}
</style>
*{<script type="text/javascript" src="/public/javascripts/jquery/jquery.qrcode.min.js"></script>}*
*{<script type="text/javascript" src="/public/javascripts/jquery/jquery-barcode-1.3.3.js"></script>}*
<script>
    *{var outputId = '${outputId}';}*
//    $(function(){
        //二维码
//        $("div.qrCodeSend").each(function(){
//            $(this).barcode("" + $(this).attr("id"), "codabar",{barWidth:2, barHeight:40,showHRI:false,output:"bmp"});
//        });

        print();
//    })
</script>
<html>
<body>
#{list orderList,as:"order"}
    #{list order?.orderItemPages,as:"orderItemPages"}
    <div class="sheetBox">
        <div class="${order_index==1 && orderItemPages_index==1?'upArea':'PageNext upArea'}">
            <div >
                <div class="printTitle">
                    <span>卓创 商城配送单</span>
                </div>
                *{<div class="printCode">}*
                    *{<span style="display: block">NO:${order?.orderNumber}</span>}*
                    *{<span style="display: block">${order?.adminStockOutCode}(${order?.printOrder})</span>}*
                *{</div>}*
            </div>

            <table class="print-order_baseinfo">
                <tr>
                    <td class="infoTableLeft">
                        <div class="rowText" style="width: 168px;">客户名称：${order?.address?.userName}</div>
                    </td>
                </tr>
                <tr >
                    <td class="infoTableLeft">
                        订单日期：${order?.createdAt?.format("yyyy-MM-dd HH:mm")}
                    </td>
                </tr>
                <tr >
                    <td class="infoTableLeft">
                        订单编号：${order?.orderNumber}
                    </td>
                </tr>
            </table>

            <table border="1px" bordercolor="black" cellspacing="0px" class="print-orderitem-table">
                <tr>
                    <th style="width: 180px;">商品名称
                        #{if order?.orderItemPages.size > 1}
                            -${orderItemPages_index}
                        #{/if}
                    </th>
                    <th style="width:80px;">店铺名称</th>
                    <th style="width: 40px;">单位</th>
                    <th style="width: 40px;">数量</th>

                </tr>
                #{list orderItemPages,as:"orderItem"}
                    <tr >
                        <td >
                            <div class="rowText">${orderItem?.name}${orderItem?.spec!=null?"("+orderItem?.spec+")":""}</div>
                        </td>
                        <td class="td-num">
                            <div class="rowText">${orderItem?.merchantName}</div>
                        </td>
                        <td class="td-num">
                            <div class="rowText">${orderItem?.spec}</div>
                        </td>
                        <td class="td-num">
                            <div class="rowText">${orderItem?.buy_number?.format('###,###,###,##0.0')}</div>
                        </td>
                    </tr>
                #{/list}

            </table>

        </div>

        <div class="bellowArea">
            <table   border="1px" bordercolor="black" cellspacing="0px"  class="print-remark-table">

                <tr>
                    <td>
                        <div class="print-remark-label">备注</div>
                    </td>
                    <td>
                        <div class="print-remark-content">&nbsp;${order?.remark}</div>
                    </td>
                </tr>

            </table>
            <div style="width:341px;height: 93px;border: 1px solid black; border-top: 0px;">
                <div style="height: 43px;">
                    <div style="font-size: 14px;font-weight: bold;">
                        &nbsp;联系电话：${order?.address?.phone}
                        <br> &nbsp;地址：
                        <span style="font-size: 14px;font-weight: normal;">&nbsp;${order?.address?.confirmAddress}</span>
                    </div>
                </div>

            </div>

        </div>
    </div>
    #{/list}
#{/list}


</body>
</html>